package com.antt.cn.test05.activities;

import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v7.app.ActionBar;
import android.support.v7.widget.Toolbar;
import android.view.View;

import com.antt.cn.mylibary.base.BaseActivity;
import com.antt.cn.test05.R;

public class ScrollingActivity extends BaseActivity {
    private FloatingActionButton fab;


    @Override
    public int getLayoutId() {
        return R.layout.activity_scrolling;
    }

    @Override
    public void initView() {
        initToolbar();

        fab = (FloatingActionButton) findViewById(R.id.fab);


    }

    private void initToolbar() {
        Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
        setSupportActionBar(toolbar);
        ActionBar actionBar = getSupportActionBar();
        actionBar.setDisplayHomeAsUpEnabled(true);
    }

    @Override
    public void initData() {

    }

    @Override
    public void initListener() {
        fab.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
                        .setAction("Action", null).show();
            }
        });
    }
}
